/**
 * 
 */
package res;

/**
 * @author araruna
 *
 */
public class Pair<T1, T2> {
	private T1 value1;
	private T2 value2;
	
	public Pair(T1 v1, T2 v2) {
		value1 = v1;
		value2 = v2;
	}
	
	public T1 getValue1() {
		return value1;
	}
	
	public T2 getValue2() {
		return value2;
	}
	
	@Override
	public int hashCode() {
		return (value1.hashCode() ^ value2.hashCode());
	}
	
	@Override
	public boolean equals(Object obj) {
		return this == obj || (obj instanceof Pair<?, ?>
			&& ((Pair<?, ?>)obj).value1.equals(this.value1) && ((Pair<?, ?>)obj).value2.equals(this.value2));
	}
}
